<template>
	<base-breadcrumb>
		<a-card>
			<div class="table-operator">
				<TitleName title="施组(方案)分类管理"></TitleName>
			<div>
				<a-button type="primary" @click="add">添加行</a-button>
				<a-button type="primary">草稿</a-button>
				<a-button type="primary">提交</a-button>
			</div>
			</div>
			<a-table :data-source="dataSource" :columns="columns" bordered>
				<span slot="description" slot-scope="text">
					<ellipsis :length="8" tooltip>{{ text }}</ellipsis>
				</span>
				<span slot="serial" slot-scope="text, record, index">{{ index + 1 }}</span>
				<!-- 操作 -->
				<span slot="operation" slot-scope="text, record">
					<template>
						<a @click="addEdit(record)">编辑</a>
					</template>
				</span>
			</a-table>
		</a-card>
		<a-modal title="施组(方案)分类管理"
		:visible="visible"  
		@ok="handleOk"  
		@cancel="handleCancel"
		:width="1010" 
		>
			<a-form>
				<a-row :gutter="24">
					<a-col :md="12" :sm="12">
						<a-form-item label="分类名称" 
						:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
						:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
							<BaseInput v-model="objFrom.doubleTypeName" />
					</a-form-item>
					</a-col>
					<a-col :md="8" :sm="6">
						<a-form-item label="状态" 
						:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
						:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
							<a-select  placeholder="请选择"  @select="handleChange">
								<a-select-option :key="0" :value="0">可用</a-select-option>
								<a-select-option :key="1" :value="1">不可用</a-select-option>
							</a-select>
						</a-form-item>
					</a-col>
				</a-row>
			</a-form>
		</a-modal>
	</base-breadcrumb>
</template>

<script>
	import TitleName from '@/components/TitleName/index.vue'
	const columns = [
		{
			title: '序号',
			width: '80px',
			scopedSlots: { customRender: 'serial' }
		},
		{
			title: '名称',
			dataIndex: 'projectName'
		},
		{
			title: '状态',
			dataIndex: 'status'
		},
		{
			title: '填报时间',
			dataIndex: 'fillingInTime'
		},
		{
			title: '操作',
			dataIndex: 'operation',
			width: '120px',
			scopedSlots: { customRender: 'operation' }
		}
	];
	export default{
		components:{
			TitleName
		},
		data(){
			this.columns = columns
			return{
				visible:false,
				objFrom:{},
				dataSource: []
			}
		},
		methods:{
			handleChange() {},
			handleOk(){
				this.visible = false
			},
			handleCancel(){
				this.visible = false
			},
			add(){
				this.visible = true
			}
		}
	}
</script>

<style>
</style>
